package com.feiyun.exception;

import lombok.Getter;
import lombok.Setter;
import org.springframework.http.HttpStatus;

/**
 * Function Desc:
 *
 * @author yan
 * @since 2023/3/20 22:40
 */
@Getter
@Setter
public class ServiceException extends RuntimeException {

    private int code;

    private String msg;

//    private ExceptionTypeEnum typeEnum;

    public ServiceException(ExceptionTypeEnum typeEnum) {
        this.code = typeEnum.getTypeNum();
        this.msg = typeEnum.getDescription();

    }
}
